

// Service UUID: FEE7
// 0xFEA1 - pedometer(steps, distance, calorie), READ & Notify
// 0xFEA2 -- target(optional, READ, WRITE, INDICATE)
// 0xFEC9 -- MAC 



#ifndef WECHAT_SPORT_SERVICE_H__
#define WECHAT_SPORT_SERVICE_H__

#ifdef __cplusplus
extern "C"  {
#endif      /* __cplusplus */

/* Add Includes here */
#include <profile_server.h>
#include <simple_ble_config.h>


#define WECHATS_SERVICE_PEDO_IDX          0x02
#define WECHATS_SERVICE_PEDO_CCCD_IDX      0x03
#define WECHATS_SERVICE_CHAR_MAC_IDX           0x05

#define WECHATS_READ_PEDO           1
#define WECHATS_READ_MAC            2

#define WECHATS_NOTIFY_PEDO_ENABLE      1
#define WECHATS_NOTIFY_PEDO_DISABLE     2

//#define TTS_WRITE_VAL               1
//#define TTS_WRITE_RX                2 

//#define TTS_NOTIFY_VAL_ENABLE       1
//#define TTS_NOTIFY_VAL_DISABLE      2 
//#define TTS_NOTIFY_TX_ENABLE        3
//#define TTS_NOTIFY_TX_DISABLE       3 

typedef struct
{
    uint8_t  write_type;
    uint16_t len;
    uint8_t *p_value;
} WECHATS_WRITE_MSG; 

typedef union
{
    uint8_t  notification_index;
    uint8_t read_value_index;
    WECHATS_WRITE_MSG write; 
} WECHATS_WRITE_MSG_DATA;

typedef struct _T_WECHATS_CALLBACK_DATA
{
    uint8_t conn_id; 
    T_SERVICE_CALLBACK_TYPE msg_type;
    WECHATS_WRITE_MSG_DATA msg_data; 
} T_WECHATS_CALLBACK_DATA;


bool wechats_set_parameter(uint8_t param_type, uint16_t len, uint8_t* data);

bool wechats_send_pedo_data( uint8_t conn_id, T_SERVER_ID service_id, void *p_value, uint16_t length);


uint8_t wechats_svc_add_service(void *p_func);


#ifdef __cplusplus
}
#endif

#endif 
